package org.wzy.spring.framework.beans.factory.config;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * 模拟 Spring BeanPostProcessor 接口实现, 用于处理事件监听
 *
 * @author wzy_h
 * @version v_1.0
 * @date 2018/5/20 19:15
 * @since 1.8
 */
public class BeanPostProcessor {

    private Logger logger = LoggerFactory.getLogger(this.getClass());

    public Object postProcessBeforeInitialization(Object bean, String beanName) {
        logger.info("进入 postProcessBeforeInitialization 方法..... beanName={}, bean={}", beanName, bean);
        return bean;
    }

    public Object postProcessAfterInitialization(Object bean, String beanName) {
        logger.info("进入 postProcessAfterInitialization 方法..... beanName={}, bean={}", beanName, bean);
        return bean;
    }
}
